package com.doctcloud.hisinfo.api;

import com.doctcloud.common.core.constant.ServiceNameConstants;
import com.doctcloud.common.core.domain.R;
import com.doctcloud.hisinfo.api.factory.RemoteHisMedrecFallbackFactory;
import com.doctcloud.hisinfo.histable.domain.medrec.PatMasterIndexDo;
import com.doctcloud.hisinfo.histable.domain.medrec.PatVisitDo;
import com.doctcloud.hisinfo.histable.domain.medrec.TransferDo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;

@FeignClient(contextId = "remoteMedrecService", value = ServiceNameConstants.HIS_MEDREC_SERVICE, fallbackFactory = RemoteHisMedrecFallbackFactory.class)
public interface RemoteHisMedrecService {
    @GetMapping("/medrec/patmasterindex/querybyid/{patientId}")
    public R<PatMasterIndexDo> getPatMasterIndexById(@PathVariable("patientId") String patientId);
    @GetMapping("/medrec/patmasterindex/querybyids")
    public R<List<PatMasterIndexDo>> getPatMasterIndexByIds(@RequestParam("patientIds") List<String> patientIds);
    @GetMapping("/medrec/transfer/listbypat")
    public List<TransferDo> listTransferByPat(@RequestParam("patientId")String patientId,
                                              @RequestParam("visitId")Integer visitId );
    @GetMapping("/medrec/patvisit/adminAfterDate")
    public List<PatVisitDo> adminAfterDate(@RequestParam("statDate") Date staticDate);
    @GetMapping("/medrec/patvisit/dischargeAfterDate")
    public List<PatVisitDo> dischargeAfterDate(@RequestParam("statDate") Date staticDate);
}

